/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2022-01-24 06:40:49
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-24 07:07:45
 */
const fs = window.require('fs').promises
// const path=window.require('path')
const fileHelper = {
    // 读取文件
    readFile: (path) => fs.readFile(path, { encoding: 'utf8' }),
    writeFile: (path, content) => fs.writeFile(path, content, { encoding: 'utf8' }),
    renameFile: (path, newPath) => fs.rename(path, newPath),
    deleteFile:(path)=>fs.unlink(path)
}

export default fileHelper